home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 3
/
Cream of the Crop 3.iso
/
clipper
/
ks94an.zip
/
TIMER.HDR
< prev
next >
Wrap
Text File
|
1994-04-25
|
3KB
|
78 lines
/******************************************************************************
The Klipper Library, for CA-Clipper 5.x
Copyright (c), 1994, Wallace Information Systems Engineering
FUNCTION:
_Timer(nChannel, nAction, nOptVal) --> nTimerData
PARAMETERS:
nChannel: Timer Channel Number (1-16 DEAFAULT: 1)
nAction : Timer Action:
KT_RESET Reset specified timer to ZERO
KT_START Start specified timer
KT_STOP Stop specified timer
KT_READ Read specified timer
KT_SET_TO Set nChannel to the value in nSet
KT_SWITCH Stop other channels & start channel nChannel
KT_ASSIGN Set specified timer to a specific value.
nOptVal : Numeric setting for SET action SET_TO.
SHORT:
16 channel "timer & stopwatch."
DESCRIPTION:
_Timer() contains 16 individual timers (assigned to "channels").
KT_RESET resets a timer channel to ZERO. Any previous time on that channel
is lost.
KT_START starts the specified nChannel timer. Time accumulates until a
KT_STOP, or KT_SWITCH is issued.
KT_STOP stops a timer channel, but does not reset it's value. It remains
stopped until a KT_START, or a KT_SWITCH to that channel is issued.
KT_READ reads the time on the specified timer channel. If the timer is
running, it continues to run after the KT_READ. If it is stopped, it remains
stopped.
KT_SET_TO causes the specified timer channel to be set to the time in
currently in the timer channel specified in nSet.
KT_SWITCH causes all timers to be stopped, and the specified channel to be
started.
KT_ASSIGN allows you to set a timer to a specific value. Thus, a timer could
continue to accumulate time through several separate runs of an application
by saving the timer contents (retrieved by KT_READ) and, when the application
is run again, setting the timer to it's previous value. KT_ASSIGN sets the
ELAPSED TIME to the specified value and clears the START and STOP time
(effectively STOPPING the timer). Thus, when you KT_ASSIGN a timer channel,
you must also start it (if desired).
Begin by KT_RESETing the desired channel to ZERO. Then start and stop the
timer as necessary. At any point, you can obtain a reading of any given
timer by KT_READing it.
You may also KT_SET_TO one timer to the current time on another channel. This
will allow you to keep one overall time reading by way of multiple channels.
All 16 timers are intially assigned a ZERO time.
NOTE:
EXAMPLE:
See DEMOS\TIMER\MAIN.PRG for example.
******************************************************************************/